package com.vidmt.api.common.spring;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.servlet.HandlerExecutionChain;

public class MyDispatcherSerlet extends DispatcherServlet {
	private static final long serialVersionUID = 1L;
	private static MyDispatcherSerlet instance;

	public static MyDispatcherSerlet getInstance() {
		return instance;
	}

	@Override
	public void init(ServletConfig config) throws ServletException {
		super.init(config);
		instance = this;
	}

	@Override
	public void destroy() {
		instance = null;
		super.destroy();
	}

	@Override
	public HandlerExecutionChain getHandler(HttpServletRequest request) throws Exception {
		return super.getHandler(request);
	}

}
